/**
 * Witontek.com.
 * Copyright (c) 2012-2017 All Rights Reserved.
 */
package test.string;

/**
 * 
 * @author Long
 * @version $Id: SubString.java, v 0.1 2017年2月11日 下午8:19:17  xiaolong.ma  Exp $
 */
public class SubString {

    /**
     * 
     * @param args
     */
    public static void main(String[] args) {
        //test1();
        String s = "13900001111";
        System.out.println(s.substring(5, 11));

        //      http://103.35.173.3/bbs/forum-279-1.html
        String bbsUrl = "http://103.35.173.3/bbs/forum-279-1.html";
        String baseUrl = bbsUrl.substring(0, bbsUrl.indexOf("-1.html"));
        System.out.println(baseUrl);

    }

    private static void test1() {
        String s = "group/school/list.htm";
        int i = s.lastIndexOf("/");
        String r = s.substring(0, i);
        System.out.println(r);

    }

}
